//
//  Input_GlobalKey_Cell.m
//  百车易车险
//
//  Created bychenxu on 14-8-7.
//  Copyright (c) 2014年 chenxu. All rights reserved.
//

#import "Input_LeftRightLabel_Cell.h"

@implementation Input_LeftRightLabel_Cell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
     
    }
    return self;
}



- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configWithLeftLabel:(NSString *)lstr andRightLabel:(NSString *)rstr andPlaceholder:(NSString *)phStr andValue:(NSString *)valueStr{
    self.leftLabel.text = lstr;
    self.rightLabel.text = rstr;
    self.textField.placeholder = phStr;
    self.textField.text = valueStr;
}

- (IBAction)textValueChanged:(UITextField *)sender {
    if (self.textValueChangedBlock) {
        self.textValueChangedBlock(self.textField.text);
    }
}

- (IBAction)endinput:(id)sender {
    if (self.endinputBlock) {
        self.endinputBlock();
    }
}

- (IBAction)touchupinside:(id)sender {
    if (self.tapInsideBlock) {
        _tapInsideBlock();
        NSLog(@"tapp");
    }
}

#pragma mark - UIView
- (void)layoutSubviews {
    [super layoutSubviews];
    self.backgroundColor = [UIColor whiteColor];


    //  self.leftLabel.frame = CGRectMake(0, 10, leftlabelwidth, 20);
   // self.backgroundView = nil;
//    self.backgroundColor = [UIColor clearColor];
//    self.contentView.frame = CGRectMake(kPaddingLeftWidth, 0, kScreen_Width - 2*kPaddingLeftWidth, self.contentView.frame.size.height);
//    self.contentView.layer.borderWidth = 0.5;
//    self.contentView.layer.cornerRadius = kCornerRadius;
//    self.contentView.layer.masksToBounds = YES;
 //   self.textField.clearButtonMode = UITextFieldViewModeWhileEditing;
}


@end
